package com.lc.user.express.httpserver;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/3/31.我的
 */
@HttpInlet(Net.GET_MY)
public class GetMy extends ZJDBAsyGet<GetMy.Info> {
    public String userid;

    public GetMy(String userid, AsyCallBack listener) {
        super(listener);
        this.userid = userid;
    }

    @Override
    protected Info parser(JSONObject object) {
        if (object.optInt("message") == 1) {
            Info info = new Info();
            info.picUrl = object.optString("picurl");
            info.mobile = object.optString("mobile");
            info.balance = object.optString("balance");
            info.coupon_number = object.optString("coupon_unmber");
            info.integral = object.optString("integral");
            info.telephone = object.optString("telephone");

            return info;
        }
        return null;
    }

    public static class Info {
        public String picUrl, mobile, balance, coupon_number, integral, telephone;
    }
}

